/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cart.hibernate.actor;

/**
 *
 * @author BibooChung
 */
import java.util.Set;
import java.util.HashSet;
import cart.hibernate.movieInformation.*;

public class Actor {
    private long actorId;
    private String actorName;
    private char gender;
    private String description;

    private Set<MovieInformation> movies = new HashSet<MovieInformation>();


    public Actor(){
    }

    public Actor(String actorName, char gender, String description){
            this.actorName = actorName;
            this.gender = gender;
            this.description = description;
    }

    public Actor(Actor actor){
            this.actorName = actor.actorName;
            this.gender = actor.gender;
            this.description = actor.description;
    }

    public long getActorId(){
        return actorId;
    }
    /**
     * Getter of actorName
     * @return this.actorName
     */
    public String getActorName(){
        return actorName;
    }

    public char getGender(){
        return gender;
    }

    public String getDescription(){
        return description;
    }
    
    public Set<MovieInformation> getMovies(){
        Set<MovieInformation> newMovieInformationsSet = new HashSet<MovieInformation>(movies);
        return newMovieInformationsSet;
    }

    /**
     * Setter of actorId
     * @param id set actorId to id's value
     */
    public void setActorId(long id) {
        this.actorId = id;
    }
    /**
     * Setter of actorName
     * @param actorName set actorName to actorName's value
     */
    public void setActorName(String actorName){
        this.actorName = actorName;
    }

    public void setGender(char gender){
        this.gender = gender;
    }

    public void setDescription(String description){
        this.description = description;
    }

    public void setMovies(Set<MovieInformation> movies){
        this.movies = new HashSet<MovieInformation>(movies);
    }

    public void setActor(String actorName, char gender, String description){
        this.actorName = actorName;
        this.gender = gender;
        this.description = description;
    }
}
